<template>
  <div id="painting">
    <div class="center">
      <div class="toptile">
        <b>手绘插画</b>
      </div>
      <div class="list">
        <ul>
          <li v-for="(item,index) in paintinglist" :key="index">
            <div class="listimg">
              <img :src="item.listimg" alt>
            </div>
            <div class="listcontent">
              <p>
                <b>{{item.listtitle}}</b>
              </p>
              <span>{{item.listcontent}}</span>
            </div>
          </li>
        </ul>
      </div>
      <div class="toptile">
        <b>视频创作</b>
      </div>
      <div class="list">
        <ul>
          <li v-for="(item,index) in paintinglist2" :key="index">
            <div class="listimg">
              <img :src="item.listimg" alt>
            </div>
            <div class="listcontent">
              <p>
                <b>{{item.listtitle}}</b>
              </p>
              <span>{{item.listcontent}}</span>
            </div>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
import getlink from "@/api/getapi.js";
export default {
  data() {
    return {
      paintinglist: [],
      paintinglist2: []
    };
  },
  mounted() {
    getlink("/mock/data/Btlist").then(data => {
      this.paintinglist = data.data.paintinglist1;
      this.paintinglist2 = data.data.paintinglist2;
    });
  }
};
</script>
<style scoped>
#painting {
  width: 100%;
  background-color: #f9fbfa;
}
.center {
  width: 3.45rem;
  margin: auto;
}
.toptile {
  width: 100%;
  height: 0.5rem;
  line-height: 0.5rem;
  font-size: 0.16rem;
}
.list {
  width: 100%;
  background-color: white;
}
.list ul {
  width: 100%;
  padding-top: 0.15rem;
}
.list ul li {
  width: 100%;
  height: 0.66rem;
  margin-bottom: 0.3rem;
}
.listimg {
  width: 1.18rem;
  height: 100%;
  float: left;
  margin-left: 0.15rem;
  margin-right: 0.15rem;
}
.listimg img {
  width: 100%;
  height: 100%;
}
.listcontent {
  width: 1.95rem;
  height: 100%;
  float: left;
}
.listcontent p {
  width: 100%;
  height: 50%;
  font-size: 0.14rem;
  line-height: 0.2rem;
}
.listcontent span {
  width: 100%;
  height: 50%;
  font-size: 0.12rem;
  line-height: 0.3rem;
  display: block;
}
</style>

